how to rebuild network configuration on centos7

yum -y install NetworkManager-tui
nmtui

if forget root password, try init=/bin/sh selinux=0, or visit:

https://wiki.centos.org/TipsAndTricks/ResetRootPassword